import { get, post } from '@/utils/requestInfo'
const VITE_API_URL = import.meta.env.VITE_API_URL
const ENV_MODE = import.meta.env.MODE

// 环境
const FTECONOMICAPI = ENV_MODE == 'prod' ? '/economics' : VITE_API_URL

const headers = {
  // 'i-temp-izone': 'lj',
};
/**
 * 获取表单详情
 * @param params
 * @returns
 */
export const getPurposeInfo = (params = {}) =>
  get(`${FTECONOMICAPI}/invest/purpose/info/info`, params, {
    showLoading: true,
    headers,
  });

/**
* 项目列表
* @param params
* @returns
*/
// H5端-重点项目列表查询
export const getProjectList = (data = {}) =>
  post(`${FTECONOMICAPI}/h5/getProjectList`, data, {
    showLoading: true,
  })

/**
 * 登陆信息接口
 * @param params
 * @returns
 */
export const getUserDataInfo = (params = {}) =>
  get(`${FTECONOMICAPI}/invest/user/getUserInfo`, params, {
    showLoading: true,
    headers,
  });

/**
 * H5端-区领导推进情况
 * @param params
 * @returns
 */
export const getLeaderState = (params = {}) =>
  get(`${FTECONOMICAPI}/h5/getLeaderState`, params, {
    showLoading: true,
    headers,
  });

/**
 * H5端-招商目标完成情况
 * @param params
 * @returns
 */
export const getTargetState = (params = {}) =>
  get(`${FTECONOMICAPI}/h5/getTargetState`, params, {
    showLoading: true,
    headers,
  });

// 标签管理-编辑标签-当前已有标签查询
export const getPurposeLabelList = (id: any) =>
  get(`${FTECONOMICAPI}/label/bind/purposeLabelList?infoId=${id}`, {}, {
    showLoading: true,
    headers,
  });

// 标签管理-编辑标签-保存
export const getSaveTag = (data = {}) =>
  post(`${FTECONOMICAPI}/label/bind/save`, data, {
    showLoading: true,
    headers,
  });
// 编辑详情信息
export const editDetailInfo = (data = {}) =>
  post(`${FTECONOMICAPI}/invest/purpose/info/edit`, data, {
    showLoading: true,
    headers,
  });
// 根据项目id查询招商小队信息，编辑招商小队时使用
export const getTeamChange = (id: any) =>
  get(`${FTECONOMICAPI}/h5/getTeamChange?id=${id}`, {}, {
    showLoading: true,
    headers,
  });
// 修改招商小队
export const changeTeam = (data = {}) =>
  post(`${FTECONOMICAPI}/h5/changeTeam`, data, {
    showLoading: true,
    headers,
  });
//处理操作记录表详情
export const getHandleInfo = (id: any) =>
  get(`${FTECONOMICAPI}/invest/purpose/handle/info?id=${id}`, {}, {
    showLoading: true,
    headers,
  });
// 上传文件
export const uploadFile = (data = {}) =>
  post(`${FTECONOMICAPI}/invest/file/upload`, data, {
    showLoading: true,
    headers,
  });
//深入洽谈新增
export const negotiationAdd = (data = {}) =>
  post(`${FTECONOMICAPI}/negotiation/handle/add`, data, {
    showLoading: true,
    headers,
  });

// H5端-页面筛选条件
export const getQueryParamList = (id: any) =>
  get(`${FTECONOMICAPI}/h5/getQueryParam`, {}, {
    showLoading: true,
    headers,
  });

//总体情况-根据类型统计洽谈对接排行榜
export const getJointStatistics = (params = {}) =>
  get(`${FTECONOMICAPI}/h5/getJointStatistics`, params, {
    showLoading: true,
    headers,
  });

//总体情况-根据类型统计落户项目排行榜
export const getSettleStatistics = (params = {}) =>
  get(`${FTECONOMICAPI}/h5/getSettleStatistics`, params, {
    showLoading: true,
    headers,
  });
//H5端-页面筛选条件
export const getQueryParam = (params = {}) =>
  get(`${FTECONOMICAPI}/h5/getQueryParam`, params, {
    showLoading: true,
    headers,
  });

// 查询投产运营信息
export const getOperateInfo = (params = {}) =>
  get(`${FTECONOMICAPI}/production/entering/getDetailById`, params, {
    headers,
  });
  
  
//H5端-总体情况-数据总览-招引落户贡献
export const getSettleContribution = (params = {}) =>
  get(`${FTECONOMICAPI}/h5/getYsAndGdp`, params, {
    showLoading: true,
    headers,
  });
  // H5端-招商项目库-引进落户列表查询
export const getSettleList = (data = {}) =>
post(`${FTECONOMICAPI}/h5/getSettleList`, data, {
  showLoading: true,
})

// 查询时间列表
export const getDataTime = (params = {}) =>
  get(`${FTECONOMICAPI}/data/screen/getDataTime`, params, {
    headers,
  });
